Skip to content

Comments

Add Google Daily Brief#104

Open
ammyyou112 wants to merge 5 commits intoopenhome-dev:devfrom
ammyyou112:add-google-daily-brief
Open

Add Google Daily Brief#104
ammyyou112 wants to merge 5 commits intoopenhome-dev:devfrom
ammyyou112:add-google-daily-brief

Conversation

@ammyyou112
Copy link
Contributor

@ammyyou112 ammyyou112 commented Feb 20, 2026

What does this Ability do?

Voice-activated morning briefing that fetches weather, Google Calendar, and Gmail in parallel, then uses an LLM to synthesize the data into a single ~60-second spoken summary. Weather is personalized per user via IP geolocation. Demonstrates real-world OAuth 2.0 integration with Google APIs and parallel async data fetching.

Suggested Trigger Words

  • good morning
  • give me my brief
  • daily brief
  • brief me
  • start my day
  • what did I miss

Type

  • New community Ability
  • Improvement to existing Ability
  • Bug fix
  • Documentation update

External APIs

  • No external APIs
  • Uses external API(s):
    • Open-Meteo API (weather) - Free, no API key required
    • Google Calendar API - OAuth 2.0 (developer's personal account for demo)
    • Gmail API - OAuth 2.0 (same credentials as Calendar)
    • ip-api.com (geolocation) - Free, no API key required

Testing

  • Tested in OpenHome Live Editor
  • All exit paths tested (said "stop", "exit", etc.)
  • Error scenarios tested (API down, bad input, etc.)

Testing Details:

  • ✅ Parallel fetching verified (all APIs called concurrently)
  • ✅ Token refresh mechanism tested with expired tokens
  • ✅ Graceful degradation tested (ability works with partial data if one API fails)
  • ✅ Follow-up commands tested ("repeat", "check my calendar", exit words)
  • ✅ Location auto-detection and caching verified
  • ✅ LLM synthesis produces natural ~60 second briefings
  • ✅ Speech splitting works correctly (1-2 sentences per speak() call)

Checklist

  • Files are in community/google-daily-brief/
  • main.py follows SDK pattern (extends MatchingCapability, has register_capability + call)
  • README.md included with description, suggested triggers, and setup
  • resume_normal_flow() called on every exit path
  • No print() — using editor_logging_handler
  • No hardcoded API keys — using placeholders with comments
  • No blocked imports (redis, connection_manager, user_config)
  • No asyncio.sleep() or asyncio.create_task() — using session_tasks
  • Error handling on all external calls

Anything else?

Key Features:

  • Parallel Data Fetching: Uses asyncio.gather() to fetch weather, calendar, and email concurrently, completing in 2-3 seconds
  • LLM Synthesis: Processes raw API data into natural, conversational spoken briefing
  • Automatic Token Refresh: Handles expired Google OAuth tokens automatically and retries failed requests
  • Smart Speech Splitting: _split_for_speech() method breaks long briefings into 1-2 sentence chunks for natural voice delivery
  • Graceful Degradation: Individual API failures don't crash the ability - continues with available data
  • Location Persistence: Auto-detects and caches user location to avoid repeated API calls
  • Follow-up Commands: Supports "repeat" to replay briefing and "check my calendar" for calendar-only view

Technical Highlights:

  • Demonstrates proper OAuth 2.0 implementation with refresh token flow
  • Shows best practices for parallel async operations in OpenHome
  • Implements persistent storage for user preferences
  • Uses LLM for data synthesis (not just API readout)
  • Voice-first design throughout (short responses, natural language)

Demo Note: This ability uses the developer's personal Google account credentials (hardcoded) as a demonstration. In production, each user would connect their own Google account via OAuth flow.

Performance: First spoken word within 6 seconds of trigger (2-3s data fetch + 2-3s LLM synthesis).

Demo Video: https://www.loom.com/share/cf4374e3211a479d9e334e91fb1d45a0

@ammyyou112 ammyyou112 requested a review from a team as a code owner February 20, 2026 22:38
@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 2026

🔀 Branch Merge Check

PR direction: add-google-daily-briefdev

Passedadd-google-daily-briefdev is a valid merge direction

@github-actions github-actions bot added community-ability Community-contributed ability first-contribution First-time contributor labels Feb 20, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 2026

🔍 Lint Results

__init__.py — Empty as expected

Files linted: community/google-daily-brief/main.py

✅ Flake8 — Passed

✅ All checks passed!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 2026

✅ Ability Validation Passed

📋 Validating: community/google-daily-brief
  ✅ All checks passed!

@Rizwan-095
Copy link
Contributor

Kindly look at the validate_ability.py file in root directory of this repo again there are few changes so build your ability according to that. Also check out template again their are changes in register_capability function.
Also look at these docs.
https://docs.openhome.com/how_to_build_an_ability

@ammyyou112
Copy link
Contributor Author

All issues fixed now @Rizwan-095 please review again

@codermohsin
Copy link
Contributor

under review

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@abubakar4360
Copy link
Contributor

There is no get_google_token.py file as mentioned in the README. Please either add a file or update the instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability first-contribution First-time contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants